package com.whfp.coky.ui.task.model

import android.os.Parcel
import android.os.Parcelable

/**
 *
 *
 * created by coky on 2022/3/24
 */
data class ThresholdInfoBean (
    val displayText: String? = null,
    val lowerLimit: Double,
    val upperLimit: Double
): Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readDouble(),
        parcel.readDouble()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(displayText)
        parcel.writeDouble(lowerLimit)
        parcel.writeDouble(upperLimit)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<ThresholdInfoBean> {
        override fun createFromParcel(parcel: Parcel): ThresholdInfoBean {
            return ThresholdInfoBean(parcel)
        }

        override fun newArray(size: Int): Array<ThresholdInfoBean?> {
            return arrayOfNulls(size)
        }
    }
}